﻿using System;
using Newtonsoft.Json;

namespace HDLogCenter.Infrastructure.Models
{
    public class LogDto
    {
        [JsonProperty("id")]
        public long Id { get; set; }

        public string IdStr
        {
            get
            {
                return Id.ToString();
            }
        }

        [JsonProperty("server_ip")]
        public string ServerIP { get; set; }

        [JsonProperty("level")]
        public int Level { get; set; }

        [JsonProperty("message")]
        public string Message { get; set; }

        [JsonProperty("error_stack")]
        public string ErrorStack { get; set; }

        [JsonProperty("is_timeout")]
        public bool IsTimeout { get; set; }

        [JsonProperty("millisecond")]
        public int Millisecond { get; set; }

        [JsonProperty("create_time")]
        public long CreateTime { get; set; }

        [JsonProperty("server_code")]
        public string ServerCode { get; set; }

        [JsonProperty("code")]
        public string Code { get; set; }

        [JsonProperty("http_method")]
        public string HttpMethod { get; set; }

        [JsonProperty("url")]
        public string URL { get; set; }
    }
}

